package com.example.onlinereadingsystem.demos.web.controller.admin;

import com.example.onlinereadingsystem.demos.web.dto.request.BgLoginParam;
import com.example.onlinereadingsystem.demos.web.dto.vo.BgLoginVo;
import com.example.onlinereadingsystem.demos.web.service.BgLoginService;
import com.example.onlinereadingsystem.demos.web.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 后台登录控制层
 * @Author ljm
 * @Date 2025/2/8
 */
@RestController
@RequestMapping("/admin")
public class BgLoginController {

    @Autowired
    private BgLoginService bgLoginService;

    /**
     * @auther ljm
     * @create 2024/12/30
     * @describe 后台登录接口
     */
    @PostMapping("/login")
    public Result<BgLoginVo> login(@RequestBody BgLoginParam param) {
        return bgLoginService.login(param);
    }
}
